home *** CD-ROM | disk | FTP | other *** search
- /*
- ===========================================
- Copyright Paul Baxter
- ===========================================
-
- Use:
- To see if the patch is installed
-
- Note: This will be called by the glue for you before each call.
-
- short installed;
- installed = SCSIPATCHAVAIL(); non zero = true
-
- To start recording SCSI calls
- OSErr result;
- result = SCSISTARTRECORD();
-
- To stop recording SCSI calls
- OSErr result;
- result = SCSISTOPRECORD();
-
- To reset the buffer pointer
- OSErr result;
- result = SCSIINITRECORD();
-
- To get the buffer pointer and count
- OSErr result;
- Ptr buffer;
- long count;
- result = SCSISENDRECORD(&buffer, &count);
-
- ===========================================
- buffer format
- ===========================================
- scsiReset command
- 0000 0000
- | |__Result Code Word
- |________Routine Selector Word
-
- scsiGet command
- 0001 0000
- | |__Result Code Word
- |_______Routine Selector Word
-
- scsiSelect, scsiSelAtn commands
- (scsiSelect = 0002) (scsiSelAtn = 000B)
- 0002 0000 0000
- | | |__Result Code Word
- | |_______SCSI ID
- |____________Routine Selector Word
-
- scsiCmd command
- 0003 0006 0800 1C32 0100 0000
- | | | | | |__Result Code Word
- | | |____|____|_______Command bytes
- | |______________________Length of Command
- |___________________________Routine Selector Word
-
- scsiComplete command
- 0004 00C1 CE20 00D2 4130 0000 2E30 0000 0000 0000
- | | | | | | | | | |__Result Code Word
- | | | | | | | | |_______Message Word Result
- | | | | | | | |____________Status Word Result
- | | | | | |____|_________________Completetion Time
- | | | |____|___________________________Message Word Pointer
- | |____|_____________________________________Status Word Pointer
- |_______________________________________________Routine Selector Word
-
- scsiRead, scsiWrite, scsiRBlind, scsiWBlind commands
- (scsiRead = 0005) (scsiWrite = 0006) (scsiRBlind = 0008) (scsiWBlind = 0009)
- 0005 0001 001E 56D2 0000 0001 0007 0000 0000 0000 0000 0000
- | | | | | | | | | | | |__Result Code Word
- | |____|____|____|____|____|____|____|____|____|_______SCSIInstrs (TIB) up to scStop
- |_________________________________________________________Routine Selector Word
-
- scsiStat command
- 000A 0000
- | |__Status Word
- |_______Routine Selector Word
-
- scsiMsgIn command
- 000C 001E 2840 0001 0000
- | | | | |__Result Code Word
- | | | |_______Message Word
- | |____|____________Message Word Pointer
- |______________________Routine Selector Word
-
- scsiMsgOut command
- 000D 0001 0000
- | | |__Result Code Word
- | |_______Message Word
- |____________Routine Selector Word
-
- data_opcode command
- 0204 0008 0000 0000 0000 0000
- | | | | | |
- | | |____|____|____|_Data
- | |_____________________Data Count
- |__________________________Routine Selector Word
-
-
- */
-
- #define data_opcode 516
-
- pascal short SCSIPATCHAVAIL(void);
- pascal OSErr SCSISTARTRECORD(void);
- pascal OSErr SCSISTOPRECORD(void);
- pascal OSErr SCSIINITRECORD(void);
- pascal OSErr SCSISENDRECORD(Ptr* buffer, long* count);
-